package team.yidong.fenda.repository;

import net.sf.json.JSONObject;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import team.yidong.fenda.entity.GuahaoHistory;

import java.util.List;

/**
 * Created by xuanlong on 2018/3/21.
 */
@Repository
public interface GuahaoHistoryRepository extends JpaRepository<GuahaoHistory, Integer>, JpaSpecificationExecutor<GuahaoHistory> {

    List<GuahaoHistory> findByOpenIdOrderByOrderDateDesc(String openId);

    GuahaoHistory findByOutTradeNo(String out_trade_no);

    List<GuahaoHistory> findByGuahaoDate(String kanbingDate);
}
